home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / ggraph / RCS / ggraph.h,v < prev    next >
Text File  |  1992-05-05  |  4KB  |  235 lines

  1. head     1.4;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.4
  10. date     92.05.05.18.47.37;  author eklee;  state Exp;
  11. branches ;
  12. next     1.3;
  13.  
  14. 1.3
  15. date     90.06.29.18.06.57;  author eklee;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     90.06.29.18.03.30;  author mendel;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     89.07.12.01.40.38;  author douglis;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @baseline from monet (?)
  32. @
  33.  
  34.  
  35. 1.4
  36. log
  37. @Changed MAXLINES from 100 to 400.
  38. @
  39. text
  40. @/****************************************************************
  41.  *                                *
  42.  *    Definitons used in gremlin files            *
  43.  *                                *
  44.  *    Gremlin file format is:                    *
  45.  *    "gremlinfile"                        *
  46.  *    <orientation> <x> <y>                    *
  47.  *    <element>                        *
  48.  *    <element>                        *
  49.  *        .                            *
  50.  *        .                            *
  51.  *     -1                            *
  52.  *                                *
  53.  *    Each element has the following format            *
  54.  *    <type>                            *
  55.  *    <points>    i.e. X, Y coords            *
  56.  *    -1.0 -1.0    to mark end of figure            *
  57.  *    <brush> <size>                        *
  58.  *    <string length> <string>                *
  59.  *                                *
  60.  *    The screen origin is 0, 0 the size is 512, 480        *
  61.  *    116 is edge of menu in vertical mode (menu on left)    *
  62.  *    395 is edge of menu in horizontal mode (menu on top)    *
  63.  *                                *
  64.  ****************************************************************/
  65. /* some useful definitions */
  66. #define TRUE    1
  67. #define FALSE    0
  68. #define NULL    0
  69. #define ERROR    -1
  70. #define BLANK    ' '
  71. #define COMMENTCHAR ';'
  72. #define TAB '\t'
  73. #define NEWLINE '\n'
  74.  
  75. #define MAXLINES 400        /* max number of lines to plot */
  76. #define MAXSIZE    5000        /* max number of points to plot */
  77. #define MAXGRAPH 1        /* max number of graphs on a page */
  78.  
  79. /* device type things */
  80. #define XSCREENMAX 500.0
  81. #define YSCREENMAX 480.0
  82. #define XSCREENMIN 120.0
  83. #define YSCREENMIN 1.0
  84. #define XPLOTMAX 480.0        /* max plot area */
  85. #define YPLOTMAX 450.0
  86. #define XORIGIN 150
  87. #define YORIGIN 50
  88.  
  89. #define SQRT2 0.707107        /* sqrt(2) / 2.0 */
  90. #define TWOPI 6.283185
  91.  
  92. #define NFONTS 4
  93. #define NBRUSHES 6
  94. #define NSIZES 4
  95. #define NSTIPPLES 8
  96.  
  97. #define GR_ERROR -1
  98. #define GR_OK 0
  99.  
  100. #define SUN_GREMLIN 0
  101. #define AED_GREMLIN 1
  102.  
  103. /*----Brush definitions type line to draw----*/
  104.  
  105. #define BRUSH_INVISIBLE    0
  106. #define BRUSH_DOT    1
  107. #define BRUSH_ALT    2
  108. #define BRUSH_THICK    3
  109. #define BRUSH_DASH    4
  110. #define BRUSH_THIN    5
  111. #define BRUSH_NORMAL    6
  112.  
  113. /*----Font definitions----*/
  114.  
  115. #define ROMAN        1
  116. #define ITALICS        2
  117. #define BOLD        3
  118. #define SPECIAL        4
  119.  
  120. /*----Font Size----*/
  121.  
  122. #define SMALL        1
  123. #define MEDIUM        2
  124. #define LARGE        3
  125. #define EXLARGE        4
  126.  
  127. /*----Figure types----*/
  128.  
  129. #define BOTLEFT_TEXT    0
  130. #define BOTRIGHT_TEXT    1
  131. #define TEXT        2
  132. #define LINE        3
  133. #define CIRCLE        4
  134. #define CURVE        5
  135. #define POLYGON        6
  136. #define TOPLEFT_TEXT    10
  137. #define TOPCENTER_TEXT    11
  138. #define TOPRIGHT_TEXT    12
  139. #define CENTERLEFT_TEXT 13
  140. #define CENTERRIGHT_TEXT 14
  141. #define BOTCENTER_TEXT    15
  142. #define CENTERCENTER_TEXT 2
  143. /*----Orientations----*/
  144.  
  145. #define HORIZONTAL    0
  146. #define VERTICAL    1
  147.  
  148. /*----Header String----*/
  149.  
  150. #define FIRSTLINE    "gremlinfile"
  151. #define SFIRSTLINE    "sungremlinfile"
  152.  
  153. /*----Miscelaneous----*/
  154.  
  155. #define LASTPOINT    (-1.0)
  156.  
  157. #define ALLINES MAXLINES+1
  158.  
  159. /* point symbol types */
  160. #define NOSYMBOL 0
  161. #define BOX 1
  162. #define RING 2
  163. #define CROSS 3
  164. #define STAR 4
  165. #define TRIANGLE 5
  166. #define UTRIANGLE 6
  167. #define CROSSBOX 7
  168. #define STARBOX 8
  169. #define DIAMOND 9
  170. #define CROSSDIAMOND 10
  171.  
  172. /* Types of graphs */
  173. #define LINEAR 0
  174. #define HIST 1
  175. #define LOG 2
  176. #define PIE 3
  177. #define BAR 4
  178. /* frame for graph */
  179. #define FRAME1X XSCREENMIN
  180. #define FRAME2X XSCREENMIN
  181. #define FRAME3X XSCREENMAX
  182. #define FRAME4X XSCREENMAX
  183. #define FRAME1Y YSCREENMIN
  184. #define FRAME2Y YSCREENMAX
  185. #define FRAME3Y YSCREENMAX
  186. #define FRAME4Y YSCREENMIN
  187.  
  188. /* type of text */
  189. #define T_TITLE 0
  190. #define T_XLABEL 1
  191. #define T_YLABEL 2
  192. #define T_LEGEND 3
  193.  
  194. /* types of frames */
  195. #define G_FRAME 0        /* graph frame */
  196. #define L_FRAME 1        /* legend frame */
  197.  
  198. #define cg graph[curgraph]
  199. #define cl graph[curgraph].lines[curline]
  200.  
  201. @
  202.  
  203.  
  204. 1.3
  205. log
  206. @Changed max number of lines from 50 to 100.
  207. @
  208. text
  209. @d36 1
  210. a36 1
  211. #define MAXLINES 100        /* max number of lines to plot */
  212. @
  213.  
  214.  
  215. 1.2
  216. log
  217. @Changed max number of points to plot from 1000 to 5000.
  218. @
  219. text
  220. @d36 1
  221. a36 1
  222. #define MAXLINES 50        /* max number of lines to plot */
  223. @
  224.  
  225.  
  226. 1.1
  227. log
  228. @Initial revision
  229. @
  230. text
  231. @d37 1
  232. a37 1
  233. #define MAXSIZE    1000        /* max number of points to plot */
  234. @
  235.